<template>
  <div style="padding:30px;">
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="IP模式">
        <el-select v-model="form.region">
          <el-option label="静态" value="shanghai"></el-option>
          <el-option label="动态" value="beijing"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="IP地址" label-width="80px">
        <el-input style="width: 20%" v-model="form.ipAddres"></el-input>
      </el-form-item>
      <el-form-item label="端口" label-width="80px">
        <el-input style="width: 20%" v-model="form.ipAddres"></el-input>
      </el-form-item>
      <el-form-item label="开启">
        <el-switch v-model="form.delivery"></el-switch>
      </el-form-item>
      <el-form-item label="工作模式">
        <el-radio-group v-model="form.resource">
          <el-radio label="TCP服务器"></el-radio>
          <el-radio label="UDP服务器"></el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="子网掩码" label-width="80px">
        <el-input style="width: 20%" v-model="form.ipAddres"></el-input>
      </el-form-item>
      <el-form-item label="网关" label-width="80px">
        <el-input style="width: 20%" v-model="form.ipAddres"></el-input>
      </el-form-item>
      <el-form-item label="目的IP或域名" label-width="80px">
        <el-input style="width: 20%" v-model="form.ipAddres"></el-input>
      </el-form-item>
      <el-form-item label="目的端口" label-width="80px">
        <el-input style="width: 20%" v-model="form.ipAddres"></el-input>
      </el-form-item>
      <el-form-item label="网页访问端口" label-width="100px">
        <el-input style="width: 20%" v-model="form.ipAddres"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">立即创建</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
export default {
  data() {
    return {
      form: {
        name: '',
        region: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: ''
      }
    }
  },
  methods: {
    onSubmit() {
      console.log('submit!');
    }
  }
}
</script>
